The Ethernet ring network, owing to its special network topology structure, facilitates the implementation of simple and fast network protection. On the Ethernet ring network, to forward packets rapidly, nodes on the Ethernet ring network need to maintain a destination media access control (MAC, Media Access Control) address forwarding table. The MAC address forwarding table is a layer 2 forwarding table based on ports, and is a basis for implementing fast forwarding of layer 2 packets. When a node on the Ethernet ring network receives a data frame from a port of the node, the node reads a MAC address encapsulated in the data frame, looks up a previously built MAC address forwarding table to find a port corresponding to the destination MAC address from the MAC address forwarding table, and forwards the data frame from the port; other ports are not affected. In this way, collision with data on other ports is avoided. The process of building or updating the MAC address forwarding table is also called MAC address learning.
On the existing Ethernet ring network, when a link on the Ethernet ring network fails, all nodes on the Ethernet ring network need to delete respective MAC address forwarding entries and re-learn the MAC addresses. Currently, some optimized technologies for deleting MAC address forwarding entries avoid some unnecessary MAC address deletion and re-learning. Details are as follows.
When a link between two adjacent nodes on the Ethernet ring network fails, a node can detect the failure, and send a failure message to a master node; after receiving the failure message, the master node judges whether the failed link is a ring protection link where a normally blocked port is located; if the failed link is the ring protection link where the normally blocked port is located, the master node does not send an instruction message for flushing the MAC address forwarding table to other nodes on the ring; if the failed link is not the ring protection link where the normally blocked port is located, the master node sends an instruction message for flushing the MAC address forwarding table to other nodes on the ring in broadcast mode. The sending of the instruction message for flushing the MAC address forwarding table is controlled according to the relationship between the failed link and the ring protection link where the normally blocked port is located, which avoids some unnecessary deletion operations.
In the prior art of VID, each node of the Ethernet ring network learns a MAC address each time when receiving a data frame. Therefore, there are a large number of MAC address forwarding entries. When a link fails so that original MAC address forwarding entries need to be deleted and MAC addresses need to be re-learned, a large amount of data needs to be deleted, especially the MAC address forwarding entries that need to be deleted by the master node. Therefore, it takes a long time to delete the MAC address forwarding entries and it takes a long time to re-learn the MAC addresses. As a result, fast recovery of services cannot be implemented properly and high requirements are imposed on hardware devices. Although the existing optimization solutions already avoid some unnecessary deletion operations, all unnecessary deletion operations cannot be avoided. Therefore, the fast recovery of services cannot be implemented properly.